<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style type="text/css">
			#div1{
				width: 1400px;
				border-top: 1px black solid;
				border-bottom: 1px black solid;
				padding-top: 5px;
				padding-bottom: 5px;
			}
		</style>
	</head>
	<body>
		<b><h2>工作经历</h2></b>
		<div id="div"></div>
			<div id="div1">
			公司名称：<input type="text" name="" id="" value="" />
			职位：<input type="text" name="" id="" value="" />
			<a href="#" onclick="remove();">删除工作经历</a>
			<br />
			<br />
			<table border="0" cellspacing="0" cellpadding="0">
				<th>
					<td>工作职责及工作内容描述：</td>
					<td><textarea rows="5" cols="50"></textarea></td>
				</th>
			</table>
			<br />
		</div>
		<a href="#" onclick="add();">添加工作经历</a>
		
	</body>
		<script type="text/javascript">
			function add(){
				var divobj=document.getElementById('div1');
				var divo2=document.createElement('div');
				divo2.id='div2';
				divo2.innerHTML=
				`<div id="div2">
			公司名称：<input type="text" name="" id="" value="" />
			职位：<input type="text" name="" id="" value="" />
			<button type="button" onclick="remove();">删除工作经历</button>
			<br />
			<br />
			<table border="0" cellspacing="0" cellpadding="0">
				<th>
					<td>工作职责及工作内容描述：</td>
					<td><textarea rows="5" cols="50"></textarea></td>
				</th>
			</table>
			<br />
		</div>`;
				divobj.appendChild(divo2);
			}
			function remove(){
				var div1obj =document.getElementById('div1');
				var div2obj =document.getElementById('div2');
				div1obj.removeChild(div2obj)
			}
		</script>
</html>
